package com.baijiaxing.weixin.family.message.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 微信事件类型
 *
 * @author June
 */
public enum FamilyEventTypeEnum {
    SUBSCRIBE("subscribe", "关注事件"),
    UNSUBSCRIBE("unsubscribe", "取消关注"),
    SCAN("SCAN", "用户已关注时的事件推送"),
    LOCATION("LOCATION", "上报地理位置事件"),
    CLICK("CLICK", "点击菜单拉取消息时的事件推送"),
    VIEW("VIEW", "点击菜单跳转链接时的事件推送");
    private String key;
    private String value;

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    private FamilyEventTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static Map<String, String> getMap() {
        Map<String, String> map = new HashMap<String, String>();
        for (FamilyEventTypeEnum eventTypeEnum : FamilyEventTypeEnum.values()) {
            map.put(eventTypeEnum.getKey(), eventTypeEnum.value);
        }
        return map;
    }
}
